import redis

# 创建redis连接池（默认连接池最大连接数 2**31=2147483648）
# POOL = redis.ConnectionPool(host='127.0.0.1', port=6379, password='123456', encoding='utf-8', max_connections=1000)
POOL = redis.ConnectionPool(host='127.0.0.1', port=6379, encoding='utf-8', max_connections=1000)


def push_queue(value):
    # 连接池中获取一个连接
    conn = redis.Redis(connection_pool=POOL)
    conn.lpush("DAY21_TASK_QUEUE", value)
